<template>
  <view class="user-agrent-layout">
		<my-header title="用户协议"></my-header>
    <my-content class="content" :default-padding-top="10">
      <rich-text :nodes="userAgreeData" class="privacy"></rich-text>
    </my-content>
  </view>
</template>

<script>
import api from '../../api'
export default {
  data() {
    return {
      userAgreeData: '',
    }
  },
  onLoad() {
    this.getContent()
  },
  onShow() {},

  methods: {
    getContent() {
      uni.showLoading({
        title: '数据加载中',
      })
      api.contents
        .show('user_agree')
        .then((res) => {
          if (res.code === 200) {
            uni.hideLoading()
            this.userAgreeData = res.data.content
          }
        })
        .catch((error) => {
          console.log(error)
        })
    },
  },
}
</script>

<style lang="scss" scoped>
.user-agrent-layout {
  width: 100%;
	height: 100%;
	min-height: 100vh;
	background-color: #171717;
}
.content {
  width: 100%;
  margin: 20rpx auto;
	height: 100%;
	padding: 40rpx;

	.privacy {
		color: #DEDEDE;
	}
}
</style>
